package com.atguigu.memonto.game;

/**
 * @program: design-patterns
 * @author: yangshen
 * @description: 守护者对象，保存游戏角色的状态
 * @create: 2022-03-10 22:46
 **/
public class Caretaker {
    //只保存一次状态
    private Memento memento;
    //对gameRoles 保存多次状态
    //private List<Memento> mementos;
    //对多个游戏角色保存多个状态
    //private HashMap<String, List<Memento>> rolesMementos;


    public Memento getMemento() {
        return memento;
    }

    public void setMemento(Memento memento) {
        this.memento = memento;
    }
}
